//
//  ViewController.m
//  ios开发常用工具类收集
//
//  Created by zxy on 2018/4/17.
//  Copyright © 2018年 zssh. All rights reserved.
//

#import "ViewController.h"
#import "UIScreen+tool.h"
#import "NSString+tool.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UILabel *lab;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    CGFloat widht = [UIScreen SCREEN_WIDTH];
    CGFloat heigth = [UIScreen SCREEN_HEIGHT];
    DLog(@"%f---%f",widht,heigth);
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(100, 100, 100, 100);
    [btn setTitle:@"你好" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    btn.titleLabel.font = [UIFont systemFontOfSize:14];
    [self.view addSubview:btn];
    
    
    UILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(200, 300, 200, 100)];
    lab.font = [UIFont systemFontOfSize:14];
    lab.textColor = [UIColor blackColor];
    lab.text = @"需要适配文字大小";
    [self.view addSubview:lab];
    
    
   self.lab.attributedText = [self.lab.text changeColor:[UIColor orangeColor] andColorRang:NSMakeRange(2, 3) andFont:[UIFont systemFontOfSize:20] andFontRange:NSMakeRange(2, 3)];
}


@end
